# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pytanque
_pkgname=pytanque
pkgver=1.1.0
pkgrel=4
pkgdesc='The petanque static python bindings.'
url='https://pypi.org/project/pytanque/#files'
arch=('x86_64' 'aarch64')
license=('BSD')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel' 'pybind11')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('b7c2aa55b0207375600a69827aa855877d2e8a416c6c52f48c5707205cf2adff5a3e1455763ef46637ec32ccd2cfd2b74a1d080500689986eb6dce74404e3f8b')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

